<div class="container-fluid">
    <div id="failedBox" class="hide"></div>
    <div class="panel panel-default">
        <div class="panel-body">
            <br>{{$role := .role}}
            <form class="form-horizontal" method="post" action="{{if $role}} /system/role/modify {{else}} /system/role/save {{end}}" onsubmit="return false">
                <input type="hidden" name="role_id" value="{{$role.role_id}}">
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span class="text-danger"> * </span> 角色名称</label>
                    <div class="col-sm-4">
                        <input type="text" name="name" class="form-control" placeholder="请输入角色名称" value="{{$role.name}}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="button" onclick="Form.ajaxSubmit(this.form, {{if $role}} true {{else}} false {{end}});" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>